// $Id$
// vim:ft=javascript

ARG_WITH("rdkafka", "for rdkafka support", "no");

if (PHP_RDKAFKA != "no") {
	if (CHECK_LIB("librdkafka.lib", "rdkafka", PHP_RDKAFKA) &&
		CHECK_HEADER_ADD_INCLUDE("librdkafka/rdkafka.h", "CFLAGS_RDKAFKA")) {

		AC_DEFINE('HAVE_RD_KAFKA_MSG_PARTIIONER_CONSISTENT', 1, '');
		AC_DEFINE('HAVE_RD_KAFKA_GET_ERR_DESCS', 1, '');
		AC_DEFINE('HAVE_NEW_KAFKA_CONSUMER', 1, '');
		EXTENSION("rdkafka", "rdkafka.c metadata.c metadata_broker.c metadata_topic.c \
				metadata_partition.c metadata_collection.c compat.c conf.c \
				topic.c queue.c message.c fun.c kafka_consumer.c topic_partition.c");

		AC_DEFINE('HAVE_RDKAFKA', 1, '');
	} else {
		WARNING("rdkafka not enabled; libraries and headers not found");
	}
}

